This invention relates, in general, to methods and apparatus for interactively developing a graphical control flow structure and associated application software for home automation systems.
Description of the Art
The operation of industrial machines and processes are typically controlled by a central controller, such as a programmable logic controller or PLC. Basically, a PLC includes a processing unit with a control program stored in a memory, input modules and output modules. The processor, when executing the control program, will control the operative state of the various outputs, typically xe2x80x9conxe2x80x9d or xe2x80x9coffxe2x80x9d, in response to the detection of various external inputs. Such PLCs typically include a unique programming language, such as ladder logic or Boolean, which are fairly common in the industrial machine industry.
Various programming standards have been developed for use in developing application programs for PLCs. Grafcet is a graphical programming language originally developed by AFCET (Association Francais Pour La Cybernetique Economique et Technique) and has now become an international PLC programming language. IEC 1131 is a standard established by the International Electrotechnical Commission that specifies the syntax and semantics of a unified suite of programming language for programmable logic controllers. Part of the standard refers to sequential function charts that is Grafcet like in structure.
Other control software is also available. ActiveX Controls is a name defined by Microsoft Corporation for programmable elements. An ActiveX control is an object that when instantiated embodies both specific data and the functions that manipulate it. The ActiveX control or component is an entity that has state, behavior and identity. An object""s state consists of its attributes or properties and the attributes"" current values. An object""s behavior consists of the operations or methods that can be performed on it and the accompanying state changes. An object""s identity is what is used to distinguish it from other objects. An ActiveX component has events that inform when something-has happened. In general, each ActiveX component can have methods, e.g., grinding, inspecting, etc., properties, e.g., grinding speed, number of passes, etc., and events, such as grinding complete. An instantiated ActiveX control is one which has been created as opposed to being simply known about. A computer program may know what ActiveX controls are available, but only when it creates one of these controls does it exist, e.g., it is instantiated. The same control may be instantiated many times or just once. Several methods can be called on any instantiated control.
In developing any application program, the program developer typically generates written code using various symbols or instructions required by the particular software program. However, syntax errors are frequent when developing such code. These errors must be found and corrected which increases the amount of program development time. The use of graphical based languages, such as Grafcet and its IEC 1131 subset, avoid the actual writing of code and enable an application developer to establish the parameters of the application process through the use of graphical symbols.
Attempts have also been made to combine graphical-control or standards languages with other software programs to enable an application developer to quickly and easily develop graphical based application software for use in a particular application. U.S. Pat. No. 5,742,504, of which the present applicant is a co-inventor, describes a method and system for quickly developing application software for use in a machine vision system. Commands and sets of instructions are received from a user to select a first custom control program of desired machine vision components, desired hardware operating parameters of the hardware and a second custom control program of desired machine vision algorithms. The first control program is linked with the desired hardware operating parameters to the second control program to form the application software. Attempts have also been made to develop graphical control-flow application software for use in a machine vision system by interactively linking the ActiveX standard with Grafcet or its IEC 1131 subset to enable an application developer to develop graphical-flow application software for a machine vision system. However, such attempts to generate graphical-flow application software have been restricted solely to the machine vision industry.
Scripting engines have become widely adopted with the emergence of Web Browsers. Various scripting languages are available, including VBScript, JScript, JavaScript, and ECMAScript. It would be desirable to automatically adapt such scripting languages or programs into application software for automation control systems.
Thus, it would be desirable to provide a method and apparatus for interactively developing application software for use in industrial automation or home automation applications where the application software developer utilizes a graphical image sequence without the need to write alphanumeric code. It would also be desirable to provide a programmed computer which queries the user""s intentions and guides the user""s choices until the particular application software is developed. It would also be desirable to provide a method and apparatus for interactively developing application software for use in industrial and home automation wherein the method and apparatus integrate standard third party controls, such as ActiveX controls, with a graphical programming language, such as Grafcet. It would also be desirable to provide a method and apparatus for interactively developing application software for use in automation systems wherein mathematical expressions can be defined in scripting language which can be incorporated as a step in the software development. It would also be desirable to provide a method and apparatus for interactively developing application software which is capable of responding to external events where the source of the event or its properties are not known.
The present invention is an apparatus and method for interactively developing a graphical control application software program for use in controlling an automation apparatus or process.
In one embodiment, the apparatus includes means for storing an application development program including a first program representing a first set of flow sequences for operating an automation apparatus sequences. Means are provided for storing a plurality of controls for use in the automation apparatus. A display displays graphical representations of the flow sequence in the first program and the controls. A computer processor means receives commands from a user to select one of the flow sequences from the first program and one control. The display displays a structure wherein the graphical representation of the selected flow sequence is a step in the structure and the selected control is mapped into the structure at a step. Each step is redefined as including a scripting language step or a mathematical expression variable. The displayed structure also has at least one transition and at least one action. Each transition may also be a scripting language transition or a mathematical expression variable, or an event triggered by an external source not known to the application program. Means are also provided for linking the first program with the controls to form an application program in response to user commands without the need for writing program codes.
The present invention also contemplates a method for developing a graphical control program. In this embodiment, the method comprises the steps of:
storing a first control program representing a first set of flow sequences for use in operating an automation apparatus, the flow sequence including at least one transition and at least one step;
storing a plurality of controls as objects for use in the automation apparatus;
setting characteristics of the objects in the selected flow sequence as having one of a plurality of selectable methods, one of a plurality of selectable properties, and one of a plurality of selectable stored events for each selected object;
redefining each step in each flow sequence as one of an object, a mathematical expression and a scripting language set;
displaying graphical representations of the object;
receiving commands from a user to select one flow sequences from the first control program and to select one object;
linking the first control program with the object; and
displaying a graphical flow structure wherein the graphical flow structure includes the selected control mapped into the selected object mapped into the selected flow sequence and having at least one transition and at least one event, each transition adapted to be linked with at least one of an event and a property of an object.
The present apparatus and method enables an application developer to generate an application program to control an automation process, such as an industrial automation apparatus or process and a home automation process. The present invention uniquely combines a control program defining component standards with hardware suited for a particular automation application and a graphical flow program which prompts the user in generating the graphical flow sequence step by step and mapping into the sequence selected hardware and hardware operating parameters.